﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAOTAgency;

namespace ManageTours
{
    public partial class HotelFacilities : Form
    {
        public HotelFacilities()
        {
            InitializeComponent();
        }

        private void buttonSave_Click(object sender, EventArgs e)
        {
            DAO.Save();
            bindingSourceHotelFacilities.DataSource = DAO.GetAllHotelFacilities();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DAO.Cancel();
            bindingSourceHotelFacilities.DataSource = DAO.GetAllHotelFacilities();
        }

        private void buttonBack_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void HotelFacilities_Load(object sender, EventArgs e)
        {
            bindingSourceHotelFacilities.DataSource = DAO.GetAllHotelFacilities();
        }
    }
}
